package com.xydtech.ecard.ftp.enums;

/**
 * @Author: liliya
 * @Description: 月份和对应天数关系
 * @Date: Created in 2023/8/15 19:25
 * @Modified:
 */

public enum FtpMonthDaysRelationEnum {

    MONTH_01(31,"01"),
    MONTH_03(31,"03"),
    MONTH_05(31,"05"),
    MONTH_07(31,"07"),
    MONTH_08(31,"08"),
    MONTH_10(31,"10"),
    MONTH_12(31,"12"),
    MONTH_02_28(28,"02_28"),
    MONTH_02_29(28,"02_29"),
    MONTH_04(30,"04"),
    MONTH_06(30,"06"),
    MONTH_09(30,"09"),
    MONTH_11(30,"11");

    private int value;
    private String label;

    FtpMonthDaysRelationEnum(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static FtpMonthDaysRelationEnum values(String val){
        for(FtpMonthDaysRelationEnum enums : FtpMonthDaysRelationEnum.values()){
            if(enums.getLabel().equals(val)){
                return enums;
            }
        }
        return null;
    }

}
